package CanvaWeb.CanvaWeb.Repository;

import CanvaWeb.CanvaWeb.pojo.RoomMember;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface RoomMemberRepository extends JpaRepository<RoomMember, Long> {
    Optional<RoomMember> findByRoomIdAndUserId(Long roomId, Long userId);
    long countByRoomId(Long roomId);
    List<RoomMember> findByRoomId(Long roomId);
}